// import { formatDate, formatCurrency } from '@/util';
let method = {
  getFullCutGiftData() {
    this.$ajaxGet(`/promotion/activity_full_cut_git/view/${this.id}`).then(data => {
      let str = ''
      let userLevel = []
      this.id = data.activityId
      this.title = data.activityName
      this.showGift = data.giftProductSkuList.length !== 0 // 是否显示赠品组件
      this.fullCutGift = data
      userLevel = data.promotionMemberScope.split(',')
      this.rankList.forEach(item => {
        userLevel.forEach(level => {
          if (item.id === level) str += item.text + '  '
        })
      })
      this.fullCutGift.promotionMemberScope = str
      // 如果参与方式不是全场，就要去调用商品接口
      if (data.joinTypeEnum !== 'WHOLE') {
        this.getProduct(data.activityId)
        this.showMain = true
      } else {
        this.showMain = false
      }
    })
  }
}
export default method;